package cn.aaa.openFeign;

import cn.aaa.domain.RuleVo;
import cn.aaa.result.JSONResult;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RuleOpenfeignFallbackFactory implements FallbackFactory<RuleOpenFeign> {
    @Override
    public RuleOpenFeign create(Throwable cause) {
        return new RuleOpenFeign() {
            @Override
            public JSONResult pricing(RuleVo ruleVo) {
                return JSONResult.error("计价失败");
            }
        };
    }
}
